# 列表中再嵌套一个列表
banji = []
s1 = ["张三", 26, "男"]
s2 = ["田七", 22, "女"]
s3 = ["王五", 25, "男"]
banji.append(s1)
banji.append(s2)
banji.append(s3)
print(banji)
# 想访问张三的年纪
print(banji[0][1])
# 循环输出内容 需要双重循环
for i in banji:
    for j in i:
        print(j, end=" ")
    print()
# 列表推导
a = [i for i in range(10)]
print(a)
# 可以使用条件判断
b = [i for i in range(10) if i % 2 == 0]
print(b)
# 将班级列表中 男同学过滤出来
nan = [i for i in banji if "男" in i]
print(nan)